<template>
	<view class="media-item view" @click="click">
		<view class="view" style="flex-direction: row-reverse;"
		>
			<text class="media-title media-title2"
				>
				<span>{{newsItem.title}}</span>
				<view class="media-description">
					{{newsItem.description}}
				</view>
				</text>
			<view v-if="newsItem.cover" class="image-section flex-row image-section-left">
				<image :fade-show="false" class="image-list1 image-list2"
					v-if="newsItem.cover" :src="newsItem.cover"></image>
			</view>
		</view>
	<view class="media-foot flex-row">
		<view class="media-info flex-row">
			<!-- <text class="info-text">{{newsItem.source}}</text> -->
			<text class="info-text">{{newsItem.createTime}}</text>
		</view>
	
	</view>
		<view class="media-item-line" style="position: absolute;"></view>
	</view>
</template>

<script setup>
	const props = defineProps({
		newsItem: {
			type: String,
			default: '',
			required: false
		},
	})

</script>

<style scoped>
	.media-description{
		lines: 3;
		text-overflow: ellipsis;
		font-size: 12px;
		color: #aaa;
	}
	.view {
		display: flex;
		flex-direction: column;
	}

	.flex-row {
		flex-direction: row;
	}

	.flex-col {
		flex-direction: column;
	}

	.list-cell {
		padding: 0 15px;
	}

	.uni-list-cell-hover {
		background-color: #eeeeee;
	}

	.media-item {
		position: relative;
		flex: 1;
		flex-direction: column;
		padding: 10px 15px 10px 15px;
		overflow: hidden;
	}

	.media-item-line {
		position: absolute;
		left: 15px;
		right: 15px;
		bottom: 0;
		height: 1px;
		background-color: #ebebeb;
	}

	.media-image-right {
		flex-direction: row;
	}

	.media-image-left {
		flex-direction: row-reverse;
	}

	.media-title {
		flex: 1;
		overflow: hidden;
	}

	.media-title {
		lines: 3;
		text-overflow: ellipsis;
		font-size: 15px;
		color: #555555;
	}

	.media-title2 {
		flex: 1;
		margin-top: 3px;
		line-height: 20px;
	}

	.image-section {
		margin-top: 10px;
		flex-direction: row;
		justify-content: space-between;
	}

	.image-section-right {
		margin-top: 0;
		margin-left: 5px;
		width: 112px;
		height: 73px;
	}

	.image-section-left {
		margin-top: 0;
		margin-right: 5px;
		width: 112px;
		height: 73px;
	}

	.image-list1 {
		height: 240px;
	}

	.image-list2 {
		width: 112px;
		height: 73px;
	}

	.image-list3 {
		width: 112px;
		height: 73px;
	}

	.media-info {
		flex-direction: row;
		align-items: center;
	}

	.info-text {
		margin-right: 10px;
		color: #999999;
		font-size: 12px;
	}

	.media-foot {
		margin-top: 12px;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.close-view {
		position: relative;
		align-items: center;
		flex-direction: row;
		width: 20px;
		height: 15px;
		line-height: 15px;
		border-width: 1upx;
		border-style: solid;
		border-color: #aaaaaa;
		border-radius: 4px;
		justify-content: center;
		text-align: center;
	}

	.close-l {
		position: absolute;
		width: 9px;
		height: 1px;
		background-color: #aaaaaa;
	}

	.close-h {
		transform: rotate(45deg);
	}

	.close-v {
		transform: rotate(-45deg);
	}
</style>
